import Https from '@/utils/https'

const getData = (params) => Https.get('/api/v1/documentCapture/getData', params, { needCode: true })

const deleteDocumentCapture = (params) => Https.post('/api/v1/documentCapture/del', params, { json: false })

const fileParsing = (params) => Https.post('/api/v1/documentCapture/fileParsing', params)

const getTableField = (params) => Https.get('/api/v1/documentCapture/getTableField', params)

const getTableList = (params) => Https.get('/api/v1/documentCapture/getTableList', params)

const saveTaskWithFromText = (params) => Https.post('/api/v1/documentCapture/saveTaskWithFromText', params, { needCode: true })

// const createSql = (params) => Https.get('/api/v1/documentCapture/createSql', params, { needCode: true })
const createSql = (params) => Https.post('/api/v1/documentCapture/createSqlAutoParse', params, { needCode: true })

const createTable = (params) => Https.post('/api/v1/documentCapture/createTable', params, { needCode: true })

const getLog = (params) => Https.get('/api/v1/documentCapture/getLog', params, { needCode: true })
export {
  getData, deleteDocumentCapture, fileParsing, getTableField, getTableList, saveTaskWithFromText, createSql, createTable, getLog,
}
